Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/jub: jet for jub:by #510

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

x/jub: jet for jub:by #510

wants to merge 3 commits into from

Conversation

xiphiness
Copy link
Contributor

@xiphiness xiphiness commented Sep 2, 2023

jub:by is a variant of jab:by, which applies a gate to a value at a certain key. It crashes if it's not there, and also does not allow it to be deleted. This variant allows a create, update, or delete operation with one gate call and one tree traversal. The gate passed to jub takes a unit and returns a unit. The unit it is passed is ~ if the kv pair does not exist, and `val if it does. The unit returned causes a deletion if it is ~, and inserts otherwise.

urbit/urbit#6782 is the corresponding PR with the hoon.

I added a jet for jib, referenced in the PR by amsden these pair of PR's would replace. I haven't written the hoon for it yet. Maybe we don't want to add it, as jub is exhaustive and would only be an ergonomic addition.

I'm not sure if I have the reference hygiene right. Notably regarding the transfer/retain semantics.

@xiphiness xiphiness requested a review from a team as a code owner September 2, 2023 02:11
@xiphiness xiphiness changed the title Jet for jub:by x/jub: jet for jub:by Sep 2, 2023
@ashelkovnykov
Copy link
Contributor

@xiphiness This PR is pending a final decision on urbit/urbit#6782, is that correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants